#include <iostream>
#include "inventory.cpp"
using namespace std;

int main ()
{
	customer newCustomer;// variable of type customer
	int nSystem;// other variables needed
	bool bSystem;

	cout << "Inventory Control System!" << endl;

	for ( bSystem = true; bSystem; )//loop until a user wants to exit
	{
		cout << "==========================" << endl//print out all the options for the usert
			<< "Menu:" << endl
			<< "1.Add products" << endl
			<< "2.Show Products" << endl
			<< "3.Restore latest report" << endl
			<< "4.Print report and exit" << endl;
		cin >> nSystem;//main menu

		switch ( nSystem )//switch case for the options selected by the user
		{
		case 1://if case one
			newCustomer.addProduct ();//add a product
			break;//break
		case 2://if case 2
			newCustomer.showProduct ();//display the products entered by the user
			break;//break
		case 3:
			newCustomer.readreceipt ();//read a receipt
			break;
		case 4:
			newCustomer.printreceipt ();// priint the receipt in a file
			bSystem = false;
			break;
		default:
			cout << "Selection not in the menu" << endl;// default statement if any other selection is made
			break;
		}
	}

	cout << "Thank you!" << endl;


	return 0;
}
//end of the main